FROM openjdk:21-slim

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       tzdata fontconfig fonts-dejavu-core \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*
LABEL maintainer="zs <1638156397@qq.com>"

ENV TZ=Asia/Shanghai

VOLUME /tmp

ADD target/youlai-boot.jar app.jar

CMD java \
    -Xms512m -Xmx512m \
    -Djava.security.egd=file:/dev/./urandom \
    -jar /app.jar

EXPOSE 8989